<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/upper_ftpprogram.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/upper_ftpprogram.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ftp_program_id',
                footer: "Foots",
                cnName: 'FTP加工中心详情',
                name: 'workbusiness/upper_ftpprogram',
                url: "/upper_ftpprogram/",
                sortName: "ftp_program_id"
            });
            const editFormFields = ref({"program_name":"","tool_name":"","knife_length":"","blade_length":"","category":"","rotate_speed":"","feed":"","side_bottom_margin":"","z_depth":"","remark":"","time":"","tool_handle":"","tool_collet":"","accuracy":""});
            const editFormOptions = ref([[{"title":"程序名称","field":"program_name","type":"text"},
                               {"title":"刀具名称","field":"tool_name","type":"text"}],
                              [{"title":"刀具长度","field":"knife_length","type":"decimal"},
                               {"title":"刃长","field":"blade_length","type":"decimal"},
                               {"title":"类型","field":"category","type":"text"}],
                              [{"title":"转速","field":"rotate_speed","type":"decimal"},
                               {"title":"进给","field":"feed","type":"decimal"},
                               {"title":"侧/底余量","field":"side_bottom_margin","type":"decimal"}],
                              [{"title":"Z深","field":"z_depth","type":"decimal"},
                               {"title":"注释","field":"remark","type":"text"},
                               {"title":"时长","field":"time","type":"decimal"}],
                              [{"title":"刀柄","field":"tool_handle","type":"text"},
                               {"title":"夹头","field":"tool_collet","type":"text"},
                               {"title":"精度","field":"accuracy","type":"decimal"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'ftp_program_id',title:'主键',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ftpmachiningcenter_id',title:'FTP加工中心单外键',type:'int',width:110,hidden:true,readonly:true,align:'left'},
                       {field:'sequence',title:'序',type:'string',width:220,align:'left',sort:true},
                       {field:'program_name',title:'程序名称',type:'string',width:220,align:'left'},
                       {field:'tool_name',title:'刀具名称',type:'string',width:220,align:'left'},
                       {field:'knife_length',title:'刀具长度',type:'decimal',width:110,align:'left'},
                       {field:'blade_length',title:'刃长',type:'decimal',width:110,align:'left'},
                       {field:'category',title:'类型',type:'string',width:220,align:'left'},
                       {field:'rotate_speed',title:'转速',type:'decimal',width:110,align:'left'},
                       {field:'feed',title:'进给',type:'string',width:220,align:'left'},
                       {field:'side_bottom_margin',title:'侧/底余量',type:'string',width:220,align:'left'},
                       {field:'z_depth',title:'Z深',type:'decimal',width:110,align:'left'},
                       {field:'remark',title:'注释',type:'string',width:220,align:'left'},
                       {field:'time',title:'时长',type:'string',width:220,align:'left'},
                       {field:'tool_handle',title:'刀柄',type:'string',width:120,align:'left'},
                       {field:'tool_collet',title:'夹头',type:'string',width:120,align:'left'},
                       {field:'accuracy',title:'精度',type:'decimal',width:120,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
